package sundun.sharding.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import sundun.sharding.entity.ImsSysCenterOrg;
import sundun.sharding.entity.ImsYesterdayJqxx;

import java.util.List;

@Mapper
public interface ImsSysCenterOrgDao extends BaseMapper<ImsSysCenterOrg> {


    @Select({"SELECT * FROM ims_sys_center_org t1 LEFT JOIN ims_yesterday_jqxx  t2  ON t1.orgCode = t2.gxdwbh LEFT JOIN ims_sys_center t3 on t1.centerId = t3.id   where  t2.bjsj >= '2021-01-01' and t2.bjsj <= '2022-01-01'  "})
    List<ImsYesterdayJqxx> getAllImsSysCenterOrg();
}
